# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=wshowkeys
pkgver=1.0
pkgrel=0
pkgdesc="Displays keys being pressed on a Wayland session"
url="https://git.sr.ht/~sircmpwn/wshowkeys"
license="GPL-3.0"
arch="all"
makedepends="
	cairo-dev
	eudev-dev
	libinput-dev
	libxkbcommon-dev
	meson
	pango-dev
	wayland-dev
	wayland-protocols
	"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/wshowkeys/archive/$pkgver.tar.gz
	fix-protocol-error.patch
	"
options="!check suid" # has no test suite; needs to be setuid to read input events

build() {
	abuild-meson . output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	chmod u+s "$pkgdir"/usr/bin/wshowkeys
}

sha512sums="
09f190d9825cb051d61484801ea7d9766c2b3c9fee4171a8926237c905a00fa98327f5d85ff601a9faf845e1cb8d58c7056811ffc7d4904985bd03d750581e6a  wshowkeys-1.0.tar.gz
69635df42ae47235c18822fea77ee38126b22093929333613da0c9d01c071eb7978013796179d3471dfb8651083f0c1f1aea5dc43f9cba9b59a2a69fd25f1913  fix-protocol-error.patch
"
